package com.gitee.wsl.struct.product.money

//import com.ionspin.kotlin.bignum.decimal.BigDecimal
//
//class NonJvmMoney(private val value: BigDecimal) : Money {
//
//   override fun plus(amount: Money): Money = NonJvmMoney(
//       value + (amount as NonJvmMoney).value
//   )
//
//   override fun minus(amount: Money): Money = NonJvmMoney(
//       value - (amount as NonJvmMoney).value
//   )
//
//   override fun times(amount: Money): Money = NonJvmMoney(
//       (value * (amount as NonJvmMoney).value)
//   )
//
//   override fun times(ratio: Money.Ratio): Money = NonJvmMoney(
//       (value * (ratio as NonJvmRatio).value)
//   )
//
//   override fun compareTo(
//       other: Money
//   ): Int = value.compareTo((other as NonJvmMoney).value)
//
//   override fun toString(): String {
//       return value.toPlainString()
//   }
//
//   override fun equals(
//       other: Any?
//   ): Boolean = (other != null)
//           && (other is NonJvmMoney)
//           && (value == other.value)
//
//   override fun hashCode(): Int = value.hashCode()
//
//   internal class NonJvmRatio(internal val value: BigDecimal) : Money.Ratio {
//
//       override fun times(amount: Money): Money = NonJvmMoney(
//           (value * (amount as NonJvmMoney).value)
//       )
//
//       override fun toString(): String {
//           return value.toPlainString()
//       }
//
//       override fun equals(
//           other: Any?
//       ): Boolean = (other != null)
//               && (other is NonJvmRatio)
//               && (value == other.value)
//
//       override fun hashCode(): Int = value.hashCode()
//
//   }
//
//}